/*
 * @Descripttion: 
 * @Author: xgh
 * @Date: 2022-09-04 20:45:06
 * @LastEditors: xgh
 * @LastEditTime: 2022-09-05 10:53:45
 */
import service from "./request";
/* 分组查询 */
export function groupSearchApi(data) {
  return service({
    url: "/groupsearch",
    method: "post",
    data:data
  })
}

export function getUserTotalApi() {
  return service({
    url: "/userinfo",
    method: "get",
  })
}



/* 分页获取用户 */
export function getUserApi(current, pageSize) {
  console.log(current, pageSize);
  return service({
    url: "/getuser?current=" + current + "&pageSize=" + pageSize,
    method: "get",
  })
}

/* 用户搜索 */
export function searchUserApi(keyword) {
  return service({
    url: "/tosearch?username=" + keyword,
    method: "get",
  })
}


/* 删除用户 */
export function deleteUserApi(id) {
  return service({
    url: "/deleteuser?id=" + id,
    method: "get",
  })
}

/* 更新用户信息 */
export function updateUserApi(data) {
  return service({
    url: "/updateuserinfo",
    method: "post",
    data:data
  })
}

/* 添加用户信息 */
export function addUserApi(data) {
  return service({
    url: "/adduserinfo",
    method: "post",
    data:data
  })
}